package com.itkaien.springzh.Mybatis;

import com.itkaien.springzh.Mybatis.mapper.UserMapper;
import com.itkaien.springzh.Mybatis.pojo.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserService {


    private UserMapper userMapper;

    public List<User> findAll(){
        return userMapper.findAll();
    }

    public void show(){
        List<User> all = findAll();
        all.forEach(System.out::println);
        System.out.println("show");
    }


}
